Page({
  data: {
    goodsList: []
  },
  onLoad() {
    wx.cloud.database().collection('goods').get()
      .then(res => {
        console.log("请求成功", res)
        this.setData({
          goodsList: res.data
        })
      })
      .catch(err => {
        console.log("请求失败", err)
      })
  },
  // 
  goDetail(e){
    console.log(e)
    wx.navigateTo({
      url: '/pages/goodsdetail/goodsdetail?id=' + e.currentTarget.dataset.id,
    })
  }
})